package cn.zero.sentinel;

import cn.zero.User;
import cn.zero.feign.UserFeignClient;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;

public class OrderFallBack {

    public static User getUserByIdFallback(@PathVariable("id") Long id, Throwable e){
        // 调用OpenFeign接口，通信User服务
        return new User(-1L, "降级触发！", "GGGGGGGGGGGGGGG！");
    }
}
